import {
	request
} from "@/utils/request";
// 获取全部课程列表
export function getCouresList(data) {
	return request({
		url: "/course/list",
		method: "get",
		data: data,
	});
}

// 获取课程分类
export function getCourseCategory(data) {
	return request({
		url: "/course/category",
		method: "get",
		data: data,
	});
}

// 获取课程内容
export function getCourseContent(data) {
	return request({
		url: "/course/content",
		method: "get",
		data: data,
	});
}

// 获取课程详情
export function getCourseInfo(data) {
	return request({
		url: "/course/info",
		method: "get",
		data: data,
	});
}
// 收藏课程
export function starCourse(data) {
	return request({
		url: "/course/star",
		method: "post",
		data: data,
	});
}

// 课程创建订单
export function addOrder(data) {
	return request({
		url: "/user/addOrder",
		method: "post",
		data: data,
	});
}

// 支付回调
export function wxCallback(data) {
	return request({
		url: "/user/wxCallback",
		method: "post",
		data: data,
	});
}

// 课程目录
export function courseChapter(data) {
	return request({
		url: "/course/chapter",
		method: "get",
		data: data,
	});
}

// 课程订单
export function orderList(data) {
	return request({
		url: "/user/orderList",
		method: "get",
		data: data,
	});
} 